package com.pengshun.modules.api.user.service.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CarUser {

    private Long gatheringUserId;

    private String gatheringUserName;

    private String gatheringUserPhone;

    private Integer totalLoad;

    private List<CarOwnerDto> dtos;

    public Integer getTotalLoad() {
        Integer total=0;
        for (CarOwnerDto dto : dtos) {
            total=total+Integer.parseInt(dto.getCarLoad());
        }
        return total;
    }
}
